import request from '../request'
export function getAllCategories () {
  return request({
    url: '/api/category/list',
    method: 'get'
  })
}

export function getAllCategorysDetail () {
  return request({
    url: '/api/category/all',
    method: 'get'
  })
}

export function getCategoryDetail (id) {
  return request({
    url: `/api/category/detail`,
    method: 'post',
    data: { id }
  })
}

/*
  * 暂时未用到
  */
export function getCategory (id) {
  return request({
    url: `/api/category/${id}`,
    method: 'post'
  })
}
